package com.soboot.system.feign.fallback;

import com.soboot.response.Result;
import com.soboot.system.feign.UserInfoFeignClient;
import com.soboot.system.vo.UserInfoVO;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author:
 * @createTime: 2022年09月21日 10:10:24
 * @version:
 * @Description:
 * @Copyright:
 */
@Slf4j
@Component
public class UserInfoFeignFallback implements UserInfoFeignClient {

    @Setter
    private Throwable cause;

    @Override
    public Result<UserInfoVO> loginByUsername(String username) {
        log.error("feign 调用{}出错", username, cause);
        return null;
    }
}
